package com.wyzz.hr.pojo.base;

import java.io.Serializable;
import java.util.*;

import com.wyzz.hr.pojo.Employee;
import com.wyzz.hr.pojo.Trcourse;
import com.wyzz.hr.pojo.Trcourseplan;
import com.wyzz.hr.pojo.Trtype;

public abstract class BaseTrcourse implements Serializable {

	public BaseTrcourse() {
		hashCode = 0x80000000;
		initialize();
	}

	public BaseTrcourse(String trcNo) {
		hashCode = 0x80000000;
		setTrcNo(trcNo);
		initialize();
	}

	public BaseTrcourse(String trcNo, Trtype trcType, Employee trcCreateBy,
			Employee trcLastChangeBy, String trcName, String trcInfo,
			Integer trcStatus, Integer trcHasContract, Integer trcHasCert,
			Date trcCreateTime, Date trcLastChangeTime) {
		hashCode = 0x80000000;
		setTrcNo(trcNo);
		setTrcType(trcType);
		setTrcCreateBy(trcCreateBy);
		setTrcLastChangeBy(trcLastChangeBy);
		setTrcName(trcName);
		setTrcInfo(trcInfo);
		setTrcStatus(trcStatus);
		setTrcHasContract(trcHasContract);
		setTrcHasCert(trcHasCert);
		setTrcCreateTime(trcCreateTime);
		setTrcLastChangeTime(trcLastChangeTime);
		initialize();
	}

	protected void initialize() {
	}

	public String getTrcNo() {
		return trcNo;
	}

	public void setTrcNo(String trcNo) {
		this.trcNo = trcNo;
		hashCode = 0x80000000;
	}

	public String getTrcName() {
		return trcName;
	}

	public void setTrcName(String trcName) {
		this.trcName = trcName;
	}

	public String getTrcInfo() {
		return trcInfo;
	}

	public void setTrcInfo(String trcInfo) {
		this.trcInfo = trcInfo;
	}

	public Integer getTrcStatus() {
		return trcStatus;
	}

	public void setTrcStatus(Integer trcStatus) {
		this.trcStatus = trcStatus;
	}

	public String getTrcFileName() {
		return trcFileName;
	}

	public void setTrcFileName(String trcFileName) {
		this.trcFileName = trcFileName;
	}

	public Date getTrcCreateTime() {
		return trcCreateTime;
	}

	public void setTrcCreateTime(Date trcCreateTime) {
		this.trcCreateTime = trcCreateTime;
	}

	public Date getTrcLastChangeTime() {
		return trcLastChangeTime;
	}

	public void setTrcLastChangeTime(Date trcLastChangeTime) {
		this.trcLastChangeTime = trcLastChangeTime;
	}

	public Trtype getTrcType() {
		return trcType;
	}

	public void setTrcType(Trtype trcType) {
		this.trcType = trcType;
	}

	public Employee getTrcCreateBy() {
		return trcCreateBy;
	}

	public void setTrcCreateBy(Employee trcCreateBy) {
		this.trcCreateBy = trcCreateBy;
	}

	public Employee getTrcLastChangeBy() {
		return trcLastChangeBy;
	}

	public void setTrcLastChangeBy(Employee trcLastChangeBy) {
		this.trcLastChangeBy = trcLastChangeBy;
	}

	public Set getTrcourseplans() {
		return trcourseplans;
	}

	public void setTrcourseplans(Set trcourseplans) {
		this.trcourseplans = trcourseplans;
	}

	public void addTotrcourseplans(Trcourseplan trcourseplan) {
		if (null == getTrcourseplans())
			setTrcourseplans(new TreeSet());
		getTrcourseplans().add(trcourseplan);
	}

	public Integer getTrcHasContract() {
		return trcHasContract;
	}

	public void setTrcHasContract(Integer trcHasContract) {
		this.trcHasContract = trcHasContract;
	}

	public Integer getTrcHasCert() {
		return trcHasCert;
	}

	public void setTrcHasCert(Integer trcHasCert) {
		this.trcHasCert = trcHasCert;
	}

	public boolean equals(Object obj) {
		if (null == obj)
			return false;
		if (!(obj instanceof Trcourse))
			return false;
		Trcourse trcourse = (Trcourse) obj;
		if (null == getTrcNo() || null == trcourse.getTrcNo())
			return false;
		else
			return getTrcNo().equals(trcourse.getTrcNo());
	}

	public int hashCode() {
		if (0x80000000 == hashCode) {
			if (null == getTrcNo())
				return super.hashCode();
			String hashStr = (new StringBuilder()).append(getClass().getName())
					.append(":").append(getTrcNo().hashCode()).toString();
			hashCode = hashStr.hashCode();
		}
		return hashCode;
	}

	public String toString() {
		return super.toString();
	}

	public static String REF = "Trcourse";
	public static String PROP_TRC_NO = "trcNo";
	public static String PROP_TRC_CREATE_BY = "trcCreateBy";
	public static String PROP_TRC_STATUS = "trcStatus";
	public static String PROP_TRC_HAS_CONTRACT = "trcHasContract";
	public static String PROP_TRC_HAS_CERT = "trcHasCert";
	public static String PROP_TRC_NAME = "trcName";
	public static String PROP_TRC_TYPE = "trcType";
	public static String PROP_TRC_LAST_CHANGE_TIME = "trcLastChangeTime";
	public static String PROP_TRC_INFO = "trcInfo";
	public static String PROP_TRC_LAST_CHANGE_BY = "trcLastChangeBy";
	public static String PROP_TRC_CREATE_TIME = "trcCreateTime";
	public static String PROP_TRC_FILE_NAME = "trcFileName";
	private int hashCode;
	private String trcNo;
	private String trcName;
	private String trcInfo;
	private Integer trcStatus;
	private Integer trcHasContract;
	private Integer trcHasCert;
	private String trcFileName;
	private Date trcCreateTime;
	private Date trcLastChangeTime;
	private Trtype trcType;
	private Employee trcCreateBy;
	private Employee trcLastChangeBy;
	private Set trcourseplans;

}
